package Merlion.FRM.bean;

import Merlion.CRM.entity.LineEntryEntity;
import Merlion.FRM.entity.InvoiceLineEntryEntity;
import javax.ejb.Remote;
import java.util.List;
import java.util.Date;
import Merlion.util.state.InvoiceAndReceiptState;
import java.util.Collection;

@Remote
public interface InvoiceAndReceiptBeanRemote {

    public void doGenerateDunningLetter(Long invoiceId);
    
    public Long addInvoice(Long salesOrderId, Date issueDate, Date invoiceDueDate, int discountedCreditTerm, String paymentMethod);

    public void editInvoice(Long invoiceId, Long salesOrderId, Double cashInAdvance, Double discountRate, Double totalPrice, Date issueDate, Date invoiceDueDate, int creditTerm, int discountedCreditTerm, Double amountDue, boolean invoiceStatus, String deleteFlag);

    public void deleteInvoice(Long invoiceId);

    public List<InvoiceAndReceiptState> viewAllInvoice();
    
    public List<InvoiceAndReceiptState> viewOutstandingInvoice();

    public List<InvoiceAndReceiptState> viewOverdueInvoice();

    public boolean updateInvoiceStatus(Long invoiceId, boolean invoiceStatus);

    public Double getCashInAdvanceAmt(Long salesOrderId);

    public String getCustomerName(Long salesOrderId);

    public Collection<LineEntryEntity> getProductDetails(Long salesOrderId);

    public Double getTotalPrice(Long salesOrderId);

    public Collection<InvoiceLineEntryEntity> getInvoiceLineEntry(Long invoiceId);

    public List<String> getPaymentMethods(Long salesOrderId);

    public String retrievePaymentMethod(Long invoiceId);

}
